# Maintainer: Jaroslav Lichtblau <svetlemodry@archlinux.org>

pkgname=perl-test-perltidy
pkgver=20230226
pkgrel=1
pkgdesc="CPAN Test::PerlTidy module"
arch=('any')
url='https://search.cpan.org/dist/Test-PerlTidy-20130104/'
license=('GPL' 'PerlArtistic')
depends=('perl' 'perl-text-diff' 'perl-file-slurp' 'perl-tidy' 'perl-file-finder')
options=('!emptydirs')
source=(https://cpan.metacpan.org/authors/id/S/SH/SHLOMIF/Test-PerlTidy-$pkgver.tar.gz)
sha256sums=('c0e242110795795d4dbb6c44166ce5574f5c7edba78a789d1bcae76685d803c1')

build() {
  cd "${srcdir}"/Test-PerlTidy-$pkgver

  PERL_MM_USE_DEFAULT=1 perl Makefile.PL installdirs=vendor
  make
}

package() {
  cd "${srcdir}"/Test-PerlTidy-$pkgver

  make install DESTDIR="${pkgdir}"

  find "${pkgdir}" -name '.packlist' -delete
  find "${pkgdir}" -name '*.pod' -delete
}
